package com.hjn.springboot.springbootwarspi.spi;

import com.hjn.springboot.springbootwarspi.spi.service.Hello;
import java.util.ServiceLoader;

/**
 * @author huaijn
 * @date 2022/4/24 /0024-16:03
 * @description todo
 */
public class TestSPI {

  public static void main(String[] args) {
    ServiceLoader<Hello> load = ServiceLoader.load(Hello.class);
    for (Hello hello : load) {
      hello.say();
    }
  }
}
